#ifndef _CACHE_
#define _CACHE_

#include <type.h>

#define BLK_SIZE 512


struct cache_block	{
	u8 block[BLK_SIZE];
	u32 tag;
	int flag;
	int cache_size;
};

struct cache_block *init_cache(u32 cache_size);
int renovate_cache(struct cache_block *cache);
int check_cache(struct cache_block *cache,u32 tag);
int add_cache(struct cache_block *cache,u8 *buf,u32 tag);


#endif
